 <?php
return array(
	'cascade' => array(
		'buildRule', 'profile', #'citys'
	),
	'formView' => array(
		'fields' => array(
//			'buildRule' => array(
//				'id' => false,
//				'goods_id' => false,
//				'start_time' => array('class'=>'DatetimePickerField'),
//				'end_time' => array('class'=>'DatetimePickerField', 'params'=> array(
//					'htmlOptions'=>array('id' => 'end_time'),	
//				)),
//				'build_type' => array('dropDownList', Yii::app()->enum->options('goods.travelBuildType'), array(
//					'id' => 'build_type',
//				)),
//				'end_type' => array('dropDownList', Yii::app()->enum->options('goods.travelEndType'), array(
//					'id' => 'end_type',
//				)),
//			),
			'buildRule' => AdminModule::VIEWS.'goods.travelBuildRule',
			'profile' => array(
				'id' => false,
				'uid' => false,
				'company_id' => array(
					'class' => 'TravelAgencyField',
				),
				'goods_id' => false,
				'create_time' => false,
				'listing_time' => false,
				'travel_province' => array(
					'class' => 'LinkageField',
					'name' => 'district',
					'fields' => array(
						array('profile.travel_province',1),
						array('profile.travel_city',2)
					),
				),
				'travel_city'=>false,
				'travel_district'=>false,
				'type' => array('dropDownList', Yii::app()->enum->options('goods.travelType')),
				'start_time' => array('class'=>'DatetimePickerField'),
				'end_time' => array('class'=>'DatetimePickerField'),
				'departure_time' => array('class'=>'DatetimePickerField','params'=>array(
					'options' => array('dateFmt'=>'H:mm')
				)),
				'return_time' => array('class'=>'DatetimePickerField','params'=>array(
					'options' => array('dateFmt'=>'H:mm')
				)),
				'departure_province' => array(
					'class' => 'LinkageField',
					'name' => 'district',
					'fields' => array(
						array('profile.departure_province',1),
						array('profile.departure_city',2),
					),
				),
				'departure_city'=>false,
				'departure_district'=>false,
				'departure_address'=> array('textField',array('size'=>40)),
				'traffic' => array('dropDownList', Yii::app()->enum->options('goods.trafficType')),
				'send_group' => array('textArea', array('rows'=>'3', 'cols'=>'50')),
				'service' => array('textArea', array('rows'=>'3', 'cols'=>'50')),
				'desc' => array('class'=>'RichtextField', 'params'=>array('htmlOptions'=>array('style'=>'width:100%;height:200px'))),
			),
			'citys' => array(
				'id' => false,
				'goods_id' => false,
				'city_id' => array('class'=>'CitySelect')
			),
		)
	),
	
	'scripts' => array(
		'publish:admin.scripts.travel',
	),
	
	'_import' => array(
		array('*', 'actions.edit//*'),
		array('formView.fields.baseInfo.*', 'actions.goods.edit//formView.fields.baseInfo.*'),
	),
);